{% extends 'basepl.html' %}
{% load static %}

{% block head %}
    <title>查看学生名单/成绩</title>
    <style>

    #roll{

        position: absolute;
        padding-right:10px;
        overflow-y:auto;
        padding-left:10px;
        SCROLLBAR-FACE-COLOR:#ffffff;
        font-size:11pt;
        padding-bottom:0;
        scrollbar-highlight-color:#ffffff;
        scrollbar-shadow-color:#919192;
        color:black;
        scrollbar-3dlight-color:#ffffff;
        line-height:100%;
        scrollbar-arrow-color:#919192;
        padding-top:0;
        scrollbar-track-color:#ffffff;
        font-family: 宋体;
        scrollbar-darkshadow-color:#ffffff;
        letter-spacing:1pt;
        height:480px;
        width: 580px;
        top: 100px;
        margin: auto 25%;
        {#border: red solid;#}
    }
    section{
        border: gray solid;
    }
    </style>
{% endblock head %}
{% block nav %}
    <li><a href="/teaIndex">首页</a></li>
    <li><a href="#top">大学课程教学过程管理系统</a></li>
    <li><a href="/">切换账号</a></li>
    <li><a href="#">&#9658;{{ request.session.cname }}&#9668;</a></li>
    <li><a href="#">关于</a></li>
   <li><a href="/">注销</a></li>
{% endblock %}
{% block li %}
<li><a href="/teaIndex/teaTask/cdetail">编&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;辑</a></li>
<li><a href="/teaIndex/teaTask/zuoye">作&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;业</a></li>
<li><a href="/teaIndex/teaTask/chengji">成&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;绩</a></li>
<li><a href="/teaIndex/teaTask/detail?val=mingdan">花&nbsp;名&nbsp;册</a></li>
<li><a href="/teaIndex/teaTask/detail?val=chengjidan">成&nbsp;绩&nbsp;单</a></li>
{% endblock li %}
{% block section %}


{% if flag == 0 %}
<div id="roll">

    <table border="1px" align="center">
        <tr><th colspan="6">{{ cname }}</th></tr>
        <tr>
        <th width="60px" >序号</th>
        <th width="100px" >学号</th>
        <th width="100px" >姓名</th>
        <th width="100px" >1</th>
        <th width="100px" >2</th>
        <th width="100px" >3</th>
        {% for v in info %}
            <tr>
                <td align="center">{{ forloop.counter }}</td>
                <td align="center">{{ v.snum.id}}</td>
                {% for i in v.snum.sinfo_set.all %}
                    <td align="center">{{ i.sname}}</td>
                {% endfor %}
                <td align="center"></td>
                <td align="center"></td>
                <td align="center"></td>

            </tr>
        {% endfor %}
    </table>
</div>
{% else %}
    <div id="roll">

        <table border="1px" align="center">
            <tr>
            <th width="60px" >序号</th>
            <th width="100px" >学号</th>
            <th width="100px" >姓名</th>
            <th width="100px" >平时成绩</th>
            <th width="100px" >考试成绩</th>
            <th width="100px" >最终成绩</th>
            </tr>
            {% for i in info %}
            <tr>
            <td align="center">{{ forloop.counter }}</td>
            <td align="center">{{ i.snum }}</td>
            <td align="center">{{ i.sname }}</td>
            <td align="center">{{ i.usualgrade }}</td>
            <td align="center">{{ i.testgrade }}</td>
            <td align="center">{{ i.finalgrade }}</td>
            </tr>
            {% endfor %}
        </table>

    </div>
    <div id="trend">
        <table border="1px" align="center">
                <tr><th colspan="11">{{ cname }}</th></tr>
                <tr>
                <th width="60px" >课程号</th>
                <th width="100px" >课程名</th>
                <th width="120px" >平时/考试占比</th>
                <th width="100px" >考试人数</th>
                <th width="100px" >最高分</th>
                <th width="100px" >最低分</th>
                <th width="100px" >平均分</th>
                <th width="100px" >优秀人数</th>
                <th width="100px" >良好人数</th>
                <th width="100px" >中等人数</th>
                <th width="100px" >不及格人数</th>
                </tr>
                {% for r in rank %}
                <tr>
                <td align="center">{{ r.cnum_id }}</td>
                <td align="center">{{ r.cname }}</td>
                <td align="center">{{ r.rate }}</td>
                <td align="center">{{ r.testcnt }}</td>
                <td align="center">{{ r.high }}</td>
                <td align="center">{{ r.low }}</td>
                <td align="center">{{ r.ave }}</td>
                <td align="center">{{ r.level1 }}</td>
                <td align="center">{{ r.level2 }}</td>
                <td align="center">{{ r.level3 }}</td>
                <td align="center">{{ r.level4 }}</td>
                </tr>
                {% endfor %}
        </table>
    </div>
{% endif %}




{% endblock section %}


